Serial communication apparatus and serial communication method

ABSTRACT

At the same when the control signal line of a printer controller is connected to the input terminal of a three-state buffer, the control signal line is connected also to the D input terminal of the flip-flop that operates according to the FFCK clock. The control signal of Q output signal of the flip-flop is inputted into the AND gate circuit, and the output signal of the gate is inputted into the control terminal of three-state buffer. Accordingly, by synchronizing the signal to the place where the level of control signal line starts, the level of data signal line changes from level 1 to the level of output. After that, waveform rounding that is generated at the time of releasing the signal line is reduced to enable higher communication speed.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to a serial communication apparatusand serial communication method to transmit and receive serial datathrough data signal lines.

[0003] 2. Description of Related Art

[0004] In recent communication apparatus, the number of signal lines isreduced to save the cost. For example, the conventional synchronousserial communication method needed at least three lines of transmissionline, receiving line and synchronous clock line, but in the recentcommunication method it has become possible to reduce to two lines ofdata line and synchronous clock line by controlling transmission andreceiving by protocol.

[0005] In the serial communication method, data signals are released byusing open drain port at transmission terminal, to prevent damaging thecontrol circuit through collision of signals especially in the case ofcommunication trouble.

[0006] However, in this kind of communication method, the problem isthat waveform rounding signal level gradually increase is generated whenthe signal line becomes from the first level to the second level. As aresult, a lot of time is necessary to fix data on the signal line, soeven if the frequency of the synchronous clock is increased to makecommunication faster, it is slower than the conventional communicationserial system having transmission and receiving signal lines separated.

SUMMARY OF THE INVENTION

[0007] Considering the above, the object of the present invention is toprovide a serial communication apparatus and a serial communicationmethod that enables high-speed communication by reducing waveformrounding that is generated when the signal line is released.

[0008] Another object of the present invention is to provide a serialcommunication apparatus and serial communication method that enablesproper transfer of data even at the time of communication error orcommunication trouble.

[0009] The serial communication apparatus according to the presentinvention for achieving the objects, which sends and receives serialdata through data signal lines, comprises a buffer means for releasingdata signals, and a level control means for releasing signal lines at agiven timing after the second level retains data signals, if the controlsignal that instructs the release of data signal to the buffer means isinputted, when the data signal line indicates the first level by thebuffer means.

[0010] Preferably, the serial communication apparatus uses a three-statebuffer as the buffer means, and the level control means retains thesecond level by the three-state buffer, and the three-state buffer isset up in a high-output impedance condition at a given timing afterinput of control signal.

[0011] Preferably, the serial communication apparatus further comprisesa means for stopping the operation of the level control means.

[0012] Preferably, the serial communication apparatus further comprisesa means for canceling the operation stop of the level control means, oncondition that at least one time of normal communication is made aftercommunication trouble if communication trouble occurred.

[0013] Preferably, the serial communication apparatus further comprisesa means for releasing the data signal line if the data signal lineindicates the first level when sending or receiving has ended.

[0014] And the serial communication method according to the presentinvention, which sends and receives serial data through data signallines, comprises a control step for releasing data signals and a levelcontrol means for releasing signal lines at a given timing after thesecond level retains data signals, if the control signal that instructsthe release of data signal to a buffer means is inputted, when the datasignal line indicates the first level by the buffer means that has alsothe function of releasing data signals.

[0015] Preferably, the serial communication method uses a three-statebuffer as the buffer means, and the control step retains the secondlevel by the three-state buffer, and the three-state buffer is set up ina high-output impedance condition at a given timing after input ofcontrol signal.

[0016] Preferably, the serial communication method further comprises astep for inhibiting the processing by the control step.

[0017] Preferably, the serial communication method further comprises astep for canceling the processing inhibition of the control step, oncondition that at least one time of normal communication is made aftercommunication trouble if communication trouble occurred.

[0018] Preferably, the serial communication method further comprises astep for releasing the data signal line if the data signal lineindicates the first level when sending or receiving has ended.

[0019] According to the present invention, by reducing the waveformrounding that is generated when signal lines are released, it ispossible to realize a serial communication apparatus and serialcommunication method that enable proper communication of data even atthe time of communication error or communication trouble, and storagemedia and programs for serial communication.

[0020] To describe more specifically, it is possible to achieveparticular effects enumerated below:

[0021] (1) When the data signal line is at a low level, it is possibleto reduce waveform rounding that occurs at the time of releasing signallines, and improve the communication speed.

[0022] (2) Even if either printer engine or printer control is aconventional serial communication apparatus, it is possible to makecommunication without any trouble.

[0023] (3) Even if data of signal line collided by error at the time ofcommunication trouble, it is possible to recover communication at highspeed without trouble to the circuit.

[0024] (4) Since it is possible to detect easily whether data of signalline are colliding under what kind of condition, it is possible to avoidtrouble without using complicated circuit.

[0025] These and other objects and advantages of the invention may bereadily ascertained by referring to the following description andaccompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0026]FIG. 1 is a drawing showing the total configuration of the printersystem including the printer, controller and printer engine that appliedthe present invention.

[0027]FIG. 2 is a sectional view showing the printer that includes theprinter engine shown in FIG. 1.

[0028]FIG. 3 is a circuit diagram showing the overall description forexplaining the interface processing between printer controller andprinter engine.

[0029]FIG. 4 is a timing chart showing communication protocol of thecircuit shown in FIG. 3.

[0030]FIG. 5 is a waveform chart explaining the operation of the circuitshown in FIG. 3.

[0031]FIG. 6 is a circuit diagram showing a first embodiment of thepresent invention.

[0032]FIG. 7 is a waveform chart showing the operation of FIG. 6.

[0033]FIG. 8 is a circuit diagram showing a second embodiment of thepresent invention.

[0034]FIG. 9 is a flow chart showing the processing procedure accordingto a third embodiment of the present invention.

[0035]FIG. 10 is a flow chart showing the processing procedure accordingto a fourth embodiment of the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0036] Below is detailed description of the embodiments of the presentinvention with reference to the drawings.

[0037] First Embodiment

[0038]FIG. 1 is a block diagram showing the configuration of the printersystem including the printer, controller and printer engine that appliedthe present invention. In this drawing, 101 is a display device(apparatus) and 102 is a host computer. 103, a printer controller,converts image data transmitted from the host computer 102 into imagesignals to enable raster scan, or controls printer engine 104 through aninterface circuit (to be described in detail later with reference toFIGS. 3 to 8). The printer controller 103 and printer engine 104 are puttogether in the same printer housing. 103 a that is included in theprinter controller 103 is a display unit on the surface of the printerhousing. 103 b is an operation unit on the surface of the printerhousing. 103 c is a CPU for the printer controller and does variouscontrols (to be described later) for making serial two-waycommunications between the printer and engine 104 and controlscommunication processing shown in FIGS. 9 and 10. 103 d is ROM, whichstores in advance the procedures (including the processing proceduresshown in FIGS. 9 and 10). 103 e is RAM, which is used as workspace ofCPU 103, etc.

[0039]FIG. 2 is a sectional block diagram of the printer including theprinter and engine 104 shown in FIG. 1. This printer is composed of abody unit 201 and an optional paper-feeding unit 202. 203 is a frontcover, and opening this enables the use of multi-purpose tray (MPT) 204,a manual paper-feeding tray. 205 is a sensor plug to detect theexistence of paper on MPT 204. 206 is an MPT paper-feeding roller tocarry the paper on MPT 204 to the inside of the printer.

[0040]207 is a paper cassette tray (PCT) as a standard paper feedingunit. 208 is a sensor plug to detect the existence of paper on the PCT.209 is a PCT paper feeding roller to carry the paper on PCT 207 to theinside of the printer.

[0041]210 is an optional paper tray (OPT) as an optional paper feedingunit. 211 is a sensor plug to detect the existence of paper on OPT 210.212 is an OPT paper feeding roller to carry the paper on OPT 210 to theinside of the printer.

[0042]213 is a roller to carry additionally the paper fed from PCT 207and OPT 210 to the inside of the printer.

[0043] Paper fed from any of MPT 204, PCT 207 and OPT 210 has its carrydirection corrected by making its front end stick momentarily to a(photo)resist shutter 214, and when a given carry power is added, itreaches a convey roller 215 further ahead to be carried. Immediatelybehind the convey roller 215, there is a sensor plug 216 called a TOPsensor, and by means of this, synchronism is ensured between theconveyed paper and image.

[0044]217 is the well-known toner cartridge, the inside of which has afirst charged roller 218, a photosensitive drum 219, and a developingcylinder 220. 221 is a transferring roller.

[0045] Writing electrostatic latent images is done by irradiating agiven laser light in a scanner unit 222 on a polygon mirror 224 that isdriven in rotation by a motor 223, and irradiating it on thephotosensitive drum 219 by a reflecting mirror 225. Paper passes thetoner transferring position and then it is carried by the conveyer belt226 to the fixer composed of a fixing roller 227 and a pressure roller228, and here the toner image is fixed on the paper.

[0046]229 is a discharge sensor, which detects the existence of paperimmediately behind the fixer. The paper that passed through the fixer iscarried additionally to a discharge roller 230. If a face-up tray 231 isopen as in FIG. 2, paper is stacked on the tray 231. And, if the tray231 is closed, paper reaches the roller 232 and is stacked on a facedowntray 233. 234 is an upper door, and opening this upward enables entryinto a toner cartridge 217.

[0047]FIG. 3 is a circuit diagram showing general description forexplaining the interface process between the printer controller 103 andthe printer engine 104 relating to the present embodiment. In thisdrawing, he printer controller 103 makes communication between theprinter and engine 104 by a data signal line 301 and a synchronous clockline 302, and controls the printer engine 104. The data signal lines 301are connected to each of the output terminals of a three-state buffer303 (also called tri-state buffer) in the printer controller 103 and athree-state buffer 304 in the printer engine 104. And the three-statebuffer 303 and the three-state buffer 304 release the data signal lines301 by control signals SCO (signals on signal lines 305 and 306)respectively. In this case, the level of the data signal lines 301 isfixed by a pull-up resistance 307.

[0048] And, the data signal lines 301 are connected to receiving signallines 308 and 309 through input buffers 320 and 321 to receive data fromthe printer controller 103 and the printer engine 104 respectively.

[0049]FIG. 4 is a timing chart showing communication protocol in theinterface circuit shown in FIG. 3. In this drawing, TxF signal is a plugshowing the transmitting condition in the printer controller 103, andRxF signal is a plug showing the receiving condition in the printercontroller.

[0050] In the communication protocol in this embodiment, the signallines 301 are released with the three-state buffers 304 and 304 set at“Hiz” when it is possible to start communication.

[0051] First, when the printer controller 103 confirms that it ispossible to start communication and sends 16-bit command data, theprinter engine 104 transmits 16-bit status data in response to this.Now, if the printer controller 103 is in a transmitting state, theprinter controller 103 synchronizes the transmitted data to the break ofthe synchronous clock line 302 to change the level of control signal SCO(signal on a signal line 305). Accordingly, control terminal of thethree-state buffer 303 is controlled. Namely, when transmitted data is“L”, control signal “L” is controlled so as to be transmitted to thedata signal line 301, and when transmitted data is “H”, the data signalline 301 is released. At this time, because the data signal line 301 isfixed at “H” through pull-up resistance 307, the control signal oftransmitted data is recognized as “H”.

[0052] Specifically, the printer engine 104 synchronizes the levelchange of such data signal line 301 to the rising of the synchronousclock line 302 to recognize by receiving signal SCI (the signal of asignal line 309). During this transmitting state, the three-state buffer304 of the printer engine 104 releases the data signal line 301.

[0053] Next, if the printer controller 103 is in a receiving state, theprinter engine 104 changes the level of the control signal line 306 bysynchronizing to the break of the synchronous clock line 302.Accordingly, the controller terminal of the three-state buffer 304 iscontrolled, and when the transmitting data to the printer controller 103is “L”, control signal “L” is controlled so as to be transmitted to thedata signal line 301. And, when the control signal of transmitting datais “H”, the data signal line 301 is released.

[0054] In this released state, since the data signal line 301 is fixedat “H” through the pull-up resistance 307, the transmitting data isrecognized as “H”. Namely, the printer control 103 recognizes suchchanges in the data signal line 301 using receiving signal SCI (thesignal of the signal line 308) by synchronizing to the start of thesynchronous clock line 302. During this receiving state, the three-statebuffer 303 of the printer controller 103 releases the data signal line301.

[0055] When serial communication is made in such a protocol as this, forexample, when the level of the control signal line 305 changes from “L”to “H”, the data signal line 301 changes as shown in FIG. 5. Namely,because rounding is generated in the data waveform when releasing thedata signal line 301 from “L”, data transmission speed is restricted dueto this. So, in this embodiment, circuit configuration as shown in FIG.6 is used to eliminate waveform rounding as shown in FIG. 5.

[0056]FIG. 6 shows the main portion of the interface circuit in thisembodiment. The portion not illustrated in this drawing is the same asthe circuit in FIG. 3. Using this FIG. 6, level control of the datasignal line 301 in the printer controller 103 is described below.

[0057] As shown in FIG. 6, at the same time when the control signal line305 in the printer controller 103 is connected to the input terminal ofthe three-state buffer 303, the control signal line 305 is connectedalso to the input terminal D of a flip-flop 602 that is operating byFFCK clock (the signal of a signal line 601). And, the output signal Qof this flip-flop 602 and the control signal SCO (the signal of signalline 305) are inputted into an AND gate circuit 603, the output signalof the gate is inputted into the control terminal of the three-statebuffer 303.

[0058] The frequency of FFCK clock (the signal of a signal line 601) ofthis time sufficiently is faster than the synchronous clock SCLK (thesignal of the signal line 302) for serial communication. And, in thisembodiment, only the flip-flop 602 is used, but plural flip-flops may beadded according to the relation between the waveform rounding of thedata signal line 301 and the frequency of FFCK clock (the signal of thesignal line 601), for example.

[0059]FIG. 7 is a timing chart showing the operation of the circuitshown in FIG. 6. As shown in the drawing, synchronizing to where thelevel of control signal line 305 starts, the level of the data signalline 301 is changed to from level 1 to an output level 702. After that,synchronizing to the timing when FFCK clock (the signal of the signalline 601) starts, the data signal line 301 becomes a released state(=level 3).

[0060] Also for the circuit near the three-state buffer 304 on the sideof the printer engine 104, it takes the circuit configuration asdescribed above.

[0061] As we have seen above, rounding is generated in the waveform thatoccurs when the data signal line 301 changes the level, and accordingly,there will be no limitations applied to the data transmission speed. Soit is possible to reduce the number of interface signal lines whileensuring the data transmission speed in the case of not using two-waysignals.

[0062] Second Embodiment

[0063]FIG. 8 is a circuit diagram showing a second embodiment of thepresent invention. This circuit is a modification of the circuitconfiguration of FIG. 6 for the detailed description of the firstembodiment.

[0064] In the present embodiment, besides the control signal SCO (thesignal of the signal line 305) in the printer controller 103, the signalthat has inverted the control signal CNT (the signal of signal line 801)is inputted into an AND gate circuit 802, and the output signal of thegate is supplied to the input terminal of the three-state buffer 303.And, into the input terminal D of the flip-flop 602 that operatesaccording to the FFCK clock (the signal of the signal line 601), controlsignal SCO (the signal of the signal line 305) is inputted. Moreover,the output signal Q of this flip-flop 602 and the control signal CNT(the signal of signal line 801) are inputted into OR gate circuit 803,and the output signal of the OR gate and the control signal SCO (thesignal of the signal line 305) are inputted into the AND gate circuit603, and the output signal of the AND gate is inputted into thecontroller terminal of the three-state buffer 303.

[0065] As is clear from FIG. 8, in this circuit, when control signal CNT(the signal of signal line 801) is “L”, the operation described in FIG.7 is made.

[0066] And, the frequency of FFCK clock (the signal of the signal line601) is to be sufficiently faster than the synchronous clock SCLK (thesignal of the signal line 302) for serial communication. Also, the abovedescription is for the circuit in the printer controller 103, but it ispossible to take the same circuit configuration also for the printerengine 104.

[0067] Third Embodiment

[0068]FIG. 9 is a flow chart showing the processing procedure by a thirdembodiment of the present invention. This embodiment uses thecommunication protocol shown in FIG. 4 and the circuit configurationshown in FIG. 8.

[0069] First, communication according to the command of CPU 103 c (SeeFIG. 1) in the printer controller 103 is started, and command data istransmitted(step S1).

[0070] As shown in FIG. 4, in the communication protocol of thisembodiment, since SCO 305 is to be “H” before communication of statusfrom the printer engine 104 after completion of transmission of commanddata, the data signal line 301 also becomes “H”. But, for example, ifnoise enters the synchronous clock line 302 during communication and thecontroller 103 and the printer engine 104 have gotten into a state ofmutual transmission, communication error occurs and the output signalsof the three-state buffers 303 and 304 collide. So communicationtransition conditions are managed in the controller 103 and theexistence of communication trouble is determined by step S2.Specifically, at the timing when the data signal line 301 was to become“H” after completion of command data transmission, if the receivingsignal 308 is not “H”, it is determined that a communication error hasoccurred.

[0071] If it is determined that a communication error has occurred,communication is terminated with control signal CNT (the signal ofsignal line 801) made “H” (Step S3). Meanwhile, if a communication errorhas not occurred, status from the printer engine 104 (step S4) isreceived. Whether a communication has occurred or not is determined bystep S5.

[0072] As shown in FIG. 4, when transmission of status data is completedin the communication protocol in the present embodiment, the controller103 and the printer engine 104 makes SCO 305 and 306 “H” respectively,so data the signal line 301 also becomes “H”. The controller 103determines the existence of communication trouble by the level of thereceiving signal 308 at step S4. Specifically, it determines acommunication error has occurred if the receiving signal 308 has notbecome “H” at the timing when the data signal line 301 is to be “H”after termination of status data communication.

[0073] If it is determined that communication trouble has occurred,communication is terminated with control signal CNT (the signal ofsignal line 801) made “H” (step S3). Meanwhile, if communication troublehas not occurred, it is proceed to step S6.

[0074] In step S6, it is determined whether control signal CNT (thesignal of signal line 801) is “H” or “L”. As a result, if control signalCNT (the signal of signal line 801 is determined “L”, communication isterminated in a normal way. Meanwhile, if the control signal CNT (thesignal of signal line 801) is determined “H”, it is proceed to step S7.

[0075] In step S7, it is determined whether Flag 905 “a set if one timeof communication is made after communication trouble” is set or not. Asa result of determination, if Flag 905 is not set, communication isterminated with Flag 905 set (step S8). And, if Flag 905 is not set, itis determined that one time of communication was made normally and thenthe control signal CNT (the signal of signal line 801) is converted to“L”, and communication is terminated with Flag 905 released additionally(step S10). Once communication is terminated, the next communication maybe started anytime.

[0076] In the above, description was given to the printer controller103, but it is possible to make the same control also in the printerengine 104.

[0077] Fourth Embodiment

[0078]FIG. 10 is a flow chart showing the processing procedure by afourth embodiment of the present invention. The present embodiment usesthe communication protocol shown in FIG. 4 and the circuit configurationshown in FIG. 8.

[0079] As mentioned above, in the communication protocol of the presentembodiment, the data signal line 301 is released with three-statebuffers 303 and 304 made “Hiz”, in the state where communication ispossible.

[0080] Therefore, in the state where communication is impossible,namely, if communication error has occurred, the receiving signal 308 ismade “L”.

[0081] Here, first, communication according to the command of CPU 103 c(see FIG. 1) of the printer controller 103 is stared and command data istransmitted (step S20). Like in the third embodiment, after terminationof command data transmission, it is determined by step S21 whether thereceiving signal SCI (the signal of the signal line 308) is made “L”.

[0082] As a result of such determination, if the receiving signal SCI(the signal of the signal line 308) is made “L”, by making the controlsignal CTN (the signal of the signal line 801) “H” and by making thecontroller SCO (the signal of the signal line 305) “H” (step S22), datasignal is released and communication is terminated.

[0083] Meanwhile, in step S21, if the receiving signal SCI (the signalof the signal line 308) is determined “H”, collision of signals has notoccurred on the data signal line 301, so the status from printer engine104 is moved to a receiving state (step S23).

[0084] After receiving the status, it is proceed to step S24, anddetermined if the receiving signal SCI (the signal of the signal line308) has become “L”. Also in this case just like step S21, if thereceiving signal SCI (the signal of the signal line 308) has not become“L”, by making the control signal CNT (the signal of the signal line801) “H”, and, by making the control signal SCO (the signal of thesignal line 305) “H” (step S22), data signal line is released andcommunication is terminated. Meanwhile, if the control signal CNT (thesignal of the signal line 308) is “H”, collision of signals has notoccurred on the data signal line, so communication is terminated as itis. And once communication is terminated, the next communication may bestarted anytime.

[0085] The above is description on the printer controller 103, but it ispossible to make the same control also in the printer engine 104.

[0086] While the described embodiment represents the preferred form thepresent invention, it is to be understood that modifications will occurto those skilled in that art without departing from the spirit of theinvention. The scope of the invention is therefore to be determinedsolely by the appended claims.

What is claimed is:
 1. A serial communication apparatus for sending andreceiving serial data through data signal lines, comprising: buffermeans for releasing data signals; and level control means for releasingsignal lines at a given timing after the second level retains datasignals, if the control signal that instructs the release of data signalto the buffer means is inputted, when the data signal line indicates thefirst level by the buffer means.
 2. A serial communication apparatusaccording to claim 1, wherein the serial communication apparatus uses athree-state buffer as the buffer means, the level control means retainsthe second level by the three-state buffer, and the three-state bufferis set up in a high-output impedance condition at a given timing afterinput of control signal.
 3. A serial communication apparatus accordingto claim 1, further comprising means for stopping the operation of thelevel control means.
 4. A serial communication apparatus according toclaim 1, further comprising means for canceling the operation stop ofthe level control means, on condition that at least one time of normalcommunication is made after communication trouble if communicationtrouble occurred.
 5. A serial communication apparatus according to claim1, further comprising means for releasing the data signal line if thedata signal line indicates the first level when sending or receiving hasended.
 6. A serial communication method of sending and receiving serialdata through data signal lines, comprising: a first step of retainingdata signals at a second level, if a control signal that instructs therelease of data signal to a buffer means is inputted, when the datasignal line indicates a first level by the buffer means that has alsothe function of releasing data signals; and a second step of releasingdata signals at a given timing after the second level retains datasignals in the first step.
 7. A serial communication method according toclaim 6, wherein the serial communication method uses a three-statebuffer as the buffer means, and the first step retains the second levelby the three-state buffer, and in the second step, the three-statebuffer is set up in a high-output impedance condition at a given timingafter input of control signal.
 8. A serial communication methodaccording to claim 6, further comprising a step of inhibiting theprocessing by the control step.
 9. A serial communication methodaccording to claim 6, further comprising a step of canceling theprocessing inhibition of the control step, on condition that at leastone time of normal communication is made after communication trouble ifcommunication trouble occurred.
 10. A serial communication methodaccording to claim 6, further comprising a step of releasing the datasignal line if the data signal line indicates the first level whensending or receiving has ended.